<?php $this->pageHeader = t('LBL_WELCOME', 'dashboard'); ?>
<p><?php echo t('LBL_WHAT_DO_YOU_WANT_TO_DO_TODAY', 'dashboard'); ?></p>
<div class="dashboard">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td class="chlft">
                <ul class="shortcut-buttons">		    		                    
				    <?php
				    $loggedUser = User::model()->findByPk(app()->user->id);						  
					?>		
				    <?php if ($loggedUser->isSuperAdmin()): ?>
		    			<li class="zoomIn animated"><a href="<?php echo url('profile/index'); ?>" class="profile"><span class="shortcut-icon"></span><?php echo t('MENU_PROFILE'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('profile/create'); ?>" class="addprofile"><span class="shortcut-icon"></span><?php echo t('MENU_ADD_PROFILE'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('region/index'); ?>" class="map"><span class="shortcut-icon"></span><?php echo t('MENU_REGION'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('province/index'); ?>" class="map"><span class="shortcut-icon"></span><?php echo t('MENU_PROVINCE'); ?></a></li>		    		    
		    			<li class="zoomIn animated"><a href="<?php echo url('user/index'); ?>" class="users"><span class="shortcut-icon"></span><?php echo t('MENU_USER'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('authitem/index'); ?>" class="authorization"><span class="shortcut-icon"></span><?php echo t('MENU_AUTHORIZATION'); ?></a></li>
		                <li class="zoomIn animated"><a href="<?php echo url('authassignment/index'); ?>" class="permission"><span class="shortcut-icon"></span><?php echo t('MENU_PERMISSION'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('category/index'); ?>" class="categories"><span class="shortcut-icon"></span><?php echo t('MENU_CATEGORY'); ?></a></li>
		                <li class="zoomIn animated"><a href="<?php echo url('article/index'); ?>" class="articles"><span class="shortcut-icon"></span><?php echo t('MENU_ARTICLE'); ?></a></li>
		                <li class="zoomIn animated"><a href="<?php echo url('menutype/index'); ?>" class="menus"><span class="shortcut-icon"></span><?php echo t('MENU_MENU'); ?></a></li>
		                <li class="zoomIn animated"><a href="<?php echo url('gallery/index'); ?>" class="gallery"><span class="shortcut-icon"></span><?php echo t('MENU_GALLERY'); ?></a></li>
						<li class="zoomIn animated"><a href="<?php echo url('media/index'); ?>" class="media"><span class="shortcut-icon"></span><?php echo t('MENU_MEDIA'); ?></a></li>                    
		                <li class="zoomIn animated"><a href="<?php echo url('dashboard/help'); ?>" class="help"><span class="shortcut-icon"></span><?php echo t('MENU_HELP'); ?></a></li>  		 
				    <?php elseif ($loggedUser->isAdmin()): ?>
		    		    <li class="zoomIn animated"><a href="<?php echo url('profile/index'); ?>" class="profile"><span class="shortcut-icon"></span><?php echo t('MENU_PROFILE'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('profile/create'); ?>" class="addprofile"><span class="shortcut-icon"></span><?php echo t('MENU_ADD_PROFILE'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('region/index'); ?>" class="map"><span class="shortcut-icon"></span><?php echo t('MENU_REGION'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('province/index'); ?>" class="map"><span class="shortcut-icon"></span><?php echo t('MENU_PROVINCE'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('user/index'); ?>" class="users"><span class="shortcut-icon"></span><?php echo t('MENU_USER'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('union/index'); ?>" class="categories"><span class="shortcut-icon"></span><?php echo t('MENU_UNION'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('hiringcompany/index'); ?>" class="categories"><span class="shortcut-icon"></span><?php echo t('MENU_HIRING'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('introducingcompany/index'); ?>" class="categories"><span class="shortcut-icon"></span><?php echo t('MENU_INTRODUCING'); ?></a></li>		    		    
						<li class="zoomIn animated"><a href="<?php echo url('dashboard/help'); ?>" class="help"><span class="shortcut-icon"></span><?php echo t('MENU_HELP'); ?></a></li>
					<?php elseif ($loggedUser->isSubmitter()): ?>
		    		    <li class="zoomIn animated"><a href="<?php echo url('profile/index'); ?>" class="profile"><span class="shortcut-icon"></span><?php echo t('MENU_PROFILE'); ?></a></li>
		    		    <li class="zoomIn animated"><a href="<?php echo url('profile/create'); ?>" class="addprofile"><span class="shortcut-icon"></span><?php echo t('MENU_ADD_PROFILE'); ?></a></li>                    
						<li class="zoomIn animated"><a href="<?php echo url('dashboard/help'); ?>" class="help"><span class="shortcut-icon"></span><?php echo t('MENU_HELP'); ?></a></li>					
					<?php elseif ($loggedUser->isEditor() || $loggedUser->isManager() || $loggedUser->isTranslator()): ?>
		    		    <li class="zoomIn animated"><a href="<?php echo url('profile/index'); ?>" class="profile"><span class="shortcut-icon"></span><?php echo t('MENU_PROFILE'); ?></a></li>		    		                       
						<li class="zoomIn animated"><a href="<?php echo url('dashboard/help'); ?>" class="help"><span class="shortcut-icon"></span><?php echo t('MENU_HELP'); ?></a></li>
					<?php endif; ?>
                    <li class="zoomIn animated"><a href="<?php echo url('authorization/logout'); ?>" class="logout"><span class="shortcut-icon"></span><?php echo t('MENU_LOGOUT'); ?></a></li>
                </ul>
            </td>
            <td class="chrgh">
                <div class="tab-controls">
                    <div class="tab-header">
                        <ul>                            
                            <li class="active"><a href="javascript:void(0);"><?php echo t('LBL_INTRODUCTION', 'dashboard'); ?></a></li>                            
<!--                            <li><a href="javascript:void(0);"><?php echo t('LBL_LASTEST_REQUESTS', 'dashboard'); ?></a></li>                            
                            <li><a href="javascript:void(0);"><?php echo t('LBL_LASTEST_ISSUES', 'dashboard'); ?></a></li>                            -->
                        </ul>
                    </div>
                    <div class="tab-content">
                        <div>                            
                            <h3><b><?php echo t('WELCOME_TO_CONTROL_PANEL', 'dashboard') ?>.</b></h3>
                            <p><?php echo t('THE_EASY_WAY_TO_HELP_YOUR_TEAM_TRACK_AND_DELIVER_PROJECTS', 'dashboard') ?></p>
                            <h3><b><?php echo t('WHERE_DO_I_START', 'dashboard') ?>?</b></h3>
                            <p><?php echo t('LEARN_MORE_ABOUT_USING_PRT_WITH_THE', 'dashboard') ?> <?php echo CHtml::link(t('USER_GUIDE', 'dashboard'), url('/dashboard/help')) ?>.
                        </div>
                        <div style="display: none">
                        </div>
                        <div style="display: none">
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</div>

<script type="text/javascript">
    $(document).ready(function() {
	tabItem = $("div.tab-controls div.tab-header ul li");
	tabContent = $("div.tab-content > div");
	$.each(tabItem, function(index) {
	    $(this).click(function() {
		tabItem.removeClass("active");
		$(this).addClass("active");
		tabContent.css("display", "none");
		tabContent.eq(index).css("display", "block");
	    });
	});
    });
</script>